Skip to content

Improve fallback names for imported and exported items - #9079

Open
GtechGovind wants to merge 1 commit into
WebAssembly:mainfrom
GtechGovind:fix/use-import-export-names
Open

Improve fallback names for imported and exported items#9079
GtechGovind wants to merge 1 commit into
WebAssembly:mainfrom
GtechGovind:fix/use-import-export-names

Conversation

@GtechGovind

Copy link
Copy Markdown

Fixes #2504

Summary

  • use import field names as fallbacks for imported items without explicit name-section entries
  • pre-scan exports and use the first export name as the fallback for unnamed defined items
  • preserve explicit name-section priority and deduplicate fallback names through the existing naming logic

Testing

  • cmake --build build --target wasm-as wasm-dis wasm-opt -j4
  • PATH=/tmp/binaryen-sep6-venv/bin:$PATH /tmp/binaryen-sep6-venv/bin/python build/bin/binaryen-lit test/lit/binary -j4 (21 passed)

@GtechGovind
GtechGovind marked this pull request as ready for review September 6, 2026 05:29
@GtechGovind
GtechGovind requested a review from a team as a code owner September 6, 2026 05:29
@GtechGovind
GtechGovind requested review from tlively and removed request for a team September 6, 2026 05:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Improve scheme to generating internal names

1 participant